﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace _045.线程的优先级
{
	internal class Program
	{
		static void Main(string[] args)
		{
			Thread a = new Thread(A);
			Thread b = new Thread(B);
			// ThreadPriority 线程的优先级
			// 高于正常的 AboveNormal
			//a.Priority = ThreadPriority.AboveNormal;

			// Highest 最高的
			a.Priority = ThreadPriority.Highest;
			// Lowest  最低的
			b.Priority = ThreadPriority.Lowest;

			a.Start();
			b.Start();
			// 线程加入进来
			//b.Join();
		}


		static void A()
		{
            while (true)
			{
				Console.Write("A");
			}
        }
		static void B()
		{
			while (true)
			{
				Console.Write("B");
			}
        }
	}
}
